package net.zdreamer.geracomium.adapter;

import java.util.List;

import com.example.geracomium.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import net.zdreamer.geracomium.entity.CommentInfos.NurseReviewInfo;
import net.zdreamer.geracomium.utils.tools_utils.ViewHolder;

public class CommentListAdapter extends MyBaseAdapter<NurseReviewInfo>{

	public CommentListAdapter(Context context, List<NurseReviewInfo> list, int res) {
		super(context, list, res);
	}


	@Override
	protected View getView(int position, View convertView, ViewGroup parent,
			NurseReviewInfo value) {
		if (convertView == null) {
			convertView = LayoutInflater.from(getmContext()).inflate(
					R.layout.comment_list_item, parent, false);
		}
		TextView reviewname = ViewHolder.get(convertView,
				R.id.review_name);
		TextView reviewtime = ViewHolder.get(convertView,
				R.id.review_time);
		TextView reviewdateil = ViewHolder.get(convertView,
				R.id.review_detail);
		reviewname.setText(value.name);
		reviewtime.setText(value.time);
		reviewdateil.setText(value.detail);
		return convertView;
	}

}
